<template>
  <div>
    <span>{{ age }}</span>
  </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue'
const PropsType = {
  msg: String,
  age: {
    type: Number,
    required: true,
  },
} as const
//as const 提示不会是 undefined

export default defineComponent({
  name: 'HelloWorld',
  props: PropsType,
  mounted() {
    this.age
  },
})
</script>

<style scoped></style>
